import { createApp } from 'vue'
import Antd from 'ant-design-vue'
import 'ant-design-vue/dist/antd.css'
import * as Icons from '@ant-design/icons-vue'
import App from './App.vue'
//重置css 样式表
import '@/styles/reset.scss'
//路由
import router from './router/index'
//pinia
import store from './store/store.js'
//全局公共组件
import UI from './components/index'
//全局公共方法
import { global } from '@/utils/global'
//ant 的message方法
import { message, notification } from 'ant-design-vue'
message.config({
    duration: 2, // 持续时间
    top: `100px`, // 到页面顶部距离
    maxCount: 3 // 最大显示数, 超过限制时，最早的消息会被自动关闭
})
const app = createApp(App)
app.config.globalProperties = {
    $global: global,
    $message: message,
    $notification: notification
}
app.use(store).use(UI).use(Antd).use(router).mount('#app')
const icons = Icons
for (const i in icons) {
    app.component(i, icons[i])
}
